#include "GameManager.h"

namespace dgame
{
GameManager::GameManager(PlayerManager &players, IInitDomino *initDomino)
    :mHeap(), mActiveGameStatus(NEW_ROUND), mPlayers(players), mInitDominoHeap(initDomino)
{
	mHeap = mInitDominoHeap->init();
}

GameManager::~GameManager()
{
	delete mInitDominoHeap;
}

const PlayerManager &GameManager::getPlayers() const
{
	return mPlayers;
}

void GameManager::deletePlayer(std::string playerName)
{
	mPlayers.deletePlayer(playerName);
}

const Player &GameManager::getActivePlayer() const
{
	return *mPlayers.getActivePlayer();
}

const DominoManager &GameManager::getDominoes() const
{
	return mHeap;
}

}
